import math


def get_circle_y(a, b, r, x):
    """

    """
    print(a,b,r,x)
    v1 = math.fabs(r * r - math.pow((x - a), 2))
    print(v1)
    v2 = math.sqrt(v1)
    print(v2)
    y_value = b - v2
    print(y_value)
    return y_value

def get_circle_y_all(a,b,r):
    circle_points = []

    start = a - r
    end = a + r + 1
    step = 0.2

    current = start
    while current <= end:
        point_y1 = get_circle_y(a, b, r, current)
        circle_points.append((current, point_y1))
        point_y2 = 2 * b - point_y1
        circle_points.append((current, point_y2))
        current += step
    return circle_points


if __name__ == "__main__":
    a = 50
    b = 50
    r = 10

    x = 50
    y = get_circle_y(a, b, r, x)
    print(x, y)

    points = get_circle_y_all(a,b,r)
    print(len(points))
    print(points)


